﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pixels.Extensions;
using Pixels.Core;

namespace Pixels.Cms.Core
{
    [PixelContentType("File", "File Content Type")]
    public class File : Pixels.ListItems.ListItem, ICommentable, IPublishable, ITaggable
    {

        [PixelContentTypeItem("FileExtention", 5)]
        public string FileExtention
        {
            get { return System.IO.Path.GetExtension(_fileName); }
        }

        [PixelContentTypeItem("Summary", 200)]
        public override string Description
        {
            get
            {
                return base.Description;
            }
            set
            {
                base.Description = value;
            }
        }

        private string _fileName;

        [PixelContentTypeItem("FileName", 200)]
        public string FileName
        {
            get { return _fileName; }
            set { _fileName = value; }
        }

        [PixelContentTypeItem("AllowComments", 0)]
        public bool AllowComments
        {
            get;
            set;
        }

        [PixelContentTypeItem("", 0)]
        public Publish Publish
        {
            get;
            set;
        }

        [PixelContentTypeItem("Tag", 0)]
        public List<string> Tags
        {
            get;
            set;
        }        
    }
}
